<?php
/**
 * Created by PhpStorm.
 * User: wangjie
 * Date: 2020/07/27
 * Time: 下午5:13
 */

namespace App\Api\Controllers\Gtxy;

use App\Api\Controllers\BaseController;
use App\Common\PaySuccessAction;
use App\Http\Controllers\Controller;
use App\Models\Order;
use App\Services\Pay\GuoTonXinYi\Notify;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Schema;
use App\Api\Controllers\Cmbc\BaseController as base;

class NotifyController extends Controller
{

    public function pay_notify_url(Request $request)
    {
        try {
            $response = Notify::notifyUrl($request);
            Log::channel("gtxy")->info("pay_notify_url", [
                "res" => json_encode($response)
            ]);
            return json_encode($response);
        } catch (\Exception $e) {
            Log::channel("gtxy")->info("pay_notify_url_Exception", [
                "res" => json_encode($response)
            ]);
            return $e->getMessage();
        }
    }


}
